package com.oolee.cloud.controller;


import com.oolee.cloud.entity.Payment;
import com.oolee.cloud.general.GeneralResult;
import com.oolee.cloud.service.FeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Slf4j
public class OrderFeignController {

    @Resource
    private FeignService feignService;

    @GetMapping(value = "consumer/payment/get/{id}")
    public GeneralResult<Payment> getPaymentById(@PathVariable("id")Long id){
        return feignService.getPaymentById(id);
    }

    @GetMapping("consumer/payment/timeout")
    public String timeOut(){
        return feignService.TimeOutShow();
    }

    @GetMapping("consumer/payment/exception")
    public String requestException(){
        return feignService.requestExceptionService();
    }
}
